import { defineStore } from 'pinia'
import { getItem, setItem } from '@/utils/auth'
export default defineStore('layout', {
  // other options...
  state: () => {
    return {
      // 所有这些属性都将自动推断其类型
      path: '/',
      ishide: getItem('ishide'),
      isloading: true,
    }
  },
  actions: {
    GETROUTEPATH(path: string) {
      this.path = path
    },
    CHANGESIDEBAR(ishide: boolean) {
      setItem('ishide', ishide)
      this.ishide = ishide
    },
  },
})
